Skip to content

Conversation

AndrewLawendy
Copy link

@AndrewLawendy AndrewLawendy commented Jul 23, 2022

It's an extra operation
nums[-1] (undefined) will never be bigger than any truthy value

@AndrewLawendy AndrewLawendy changed the title refactor(insertion-sort): ♻️ no need to check on j <= 0any trythy >= undefined anyway refactor(insertion-sort): ♻️ no need to check on j <= 0 truthy >= undefined anyway Jul 23, 2022
@AndrewLawendy AndrewLawendy changed the title refactor(insertion-sort): ♻️ no need to check on j <= 0 truthy >= undefined anyway refactor(insertion-sort): ♻️ no need to check on j <= 0, undefined is never > truthy Jul 23, 2022
@AndrewLawendy AndrewLawendy force-pushed the patch-insertion-sort branch from 6aa7668 to e33bda6 Compare July 23, 2022 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant